
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.svh.Paginator;

import com.svh.Entidad.Empleado;
import com.svh.Hibernate.HibernatePaginator;
import com.svh.Utils.Estado;
import org.hibernate.HibernateException;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

public class EmpleadoUsuarioPaginator extends HibernatePaginator<Empleado> {

    public EmpleadoUsuarioPaginator() {
        super();
    }
        boolean flag;

    public EmpleadoUsuarioPaginator(boolean flag) {
        this.flag = flag;
    }

    @Override
    public void initFiltro() {
        DetachedCriteria criteria = null;
        try {
            criteria = DetachedCriteria.forClass(Empleado.class, "empleado").add(Restrictions.isNotNull("empleado.usuario"));
            super.filtroCriteria = criteria;
        } catch (HibernateException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    public void initlista(){
        
    }
}
